﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ManterEvento.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p>
        &nbsp;</p>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager> 
    <div class="demoheading" style="width:400px">Manter Evento</div>
    <asp:Panel ID="Panel2" runat="server" CssClass="collapsePanelHeader" Height="20px" Width="400px">
                    <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
                        <div style="float: left;">Manter Evento</div>
                    </div>
                </asp:Panel>
    
    <div style="width:400px">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
             <ContentTemplate>
                 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                     DataSourceID="osdEvento" AllowPaging="True" BackColor="White" 
                     BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
                     ForeColor="Black" GridLines="Vertical">
                     <FooterStyle BackColor="#CCCC99" />
                     <RowStyle BackColor="#F7F7DE" />
                     <Columns>
                         <asp:BoundField DataField="Codigo" HeaderText="Codigo" 
                             SortExpression="Codigo" />
                         <asp:BoundField DataField="Tipo" HeaderText="Tipo" SortExpression="Tipo" />
                         <asp:BoundField DataField="Dtinicio" HeaderText="Dtinicio" 
                             SortExpression="Dtinicio" />
                         <asp:BoundField DataField="Dtfim" HeaderText="Dtfim" SortExpression="Dtfim" />
                         <asp:BoundField DataField="Nome" HeaderText="Nome" SortExpression="Nome" />
                         <asp:BoundField DataField="Usuario" HeaderText="Usuario" 
                             SortExpression="Usuario" />
                         <asp:TemplateField HeaderText="Atualiza/Remove">
                             <ItemTemplate>
                                 <asp:LinkButton ID="LinkButton1" runat="server" onclick="LinkButton1_Click">Atualizar</asp:LinkButton>
                                 &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" onclick="LinkButton2_Click">remover</asp:LinkButton>
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                     <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                     <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                     <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                     <AlternatingRowStyle BackColor="White" />
                 </asp:GridView>
                 &nbsp;
            </ContentTemplate>
            </asp:UpdatePanel>
        </div>
        
        <asp:ObjectDataSource ID="osdEvento" runat="server" 
        DataObjectTypeName="Negocios.Evento" DeleteMethod="Excluir" 
        InsertMethod="Insere" OldValuesParameterFormatString="original_{0}" 
        SelectMethod="ConsultaTodos" TypeName="Negocios.EventoBLL" 
        UpdateMethod="Atualizar"></asp:ObjectDataSource>
        
        <br />
         <div style="width:400px">
         <asp:Panel ID="Panel1" runat="server" CssClass="collapsePanelHeader" Height="20px" Width="400px">
                    <div style="padding: 5px; cursor: pointer; vertical-align: middle;">
                        <div style="float: left;"></div>
                    </div>
                </asp:Panel>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
             <ContentTemplate>
                 <table class="divDados" style="width: 100%">
                     <tr class="divOID">
                         <td style="width: 126px">
                             <asp:Label ID="Label1" runat="server" Text="Código"></asp:Label>
                         </td>
                         <td style="width: 282px">
                             <asp:TextBox ID="BtCodigo" runat="server" Enabled="False"></asp:TextBox>
                             <asp:Button ID="BtNovo" runat="server" Text="Novo" onclick="Button1_Click" />
                         </td>
                     </tr>
                     <tr>
                         <td style="width: 126px">
                             <asp:Label ID="Label2" runat="server" Text="Nome"></asp:Label>
                         </td>
                         <td style="width: 282px">
                             <asp:TextBox ID="BtNome" runat="server" Enabled="False"></asp:TextBox>
                         </td>
                     </tr>
                     <tr>
                         <td style="width: 126px">
                             <asp:Label ID="Label3" runat="server" Text="Início"></asp:Label>
                         </td>
                         <td style="width: 282px">
                             <asp:TextBox ID="BtInicio" runat="server" Enabled="False" 
                                 ontextchanged="TextBox3_TextChanged"></asp:TextBox>
                         </td>
                     </tr>
                     <tr>
                         <td style="width: 126px">
                             <asp:Label ID="Label4" runat="server" Text="Fim"></asp:Label>
                         </td>
                         <td style="width: 282px">
                             <asp:TextBox ID="BtFim" runat="server" Enabled="False" 
                                 ontextchanged="TextBox4_TextChanged"></asp:TextBox>
                         </td>
                     </tr>
                     <tr>
                         <td style="width: 126px">
                             <asp:Label ID="Label5" runat="server" Text="Tipo"></asp:Label>
                         </td>
                         <td style="width: 282px">
                             <asp:DropDownList ID="BtTipo" runat="server" Enabled="False">
                                 <asp:ListItem Value="0">--Selecione o Tipo--</asp:ListItem>
                                 <asp:ListItem Value="1">Turismo</asp:ListItem>
                                 <asp:ListItem Value="2">Casa</asp:ListItem>
                                 <asp:ListItem Value="3">Trabalho</asp:ListItem>
                                 <asp:ListItem Value="4">Família</asp:ListItem>
                                 <asp:ListItem Value="5">Outro lazer</asp:ListItem>
                                 <asp:ListItem Value="6">Outros</asp:ListItem>
                             </asp:DropDownList>
                         </td>
                     </tr>
                     <tr>
                         <td align="center" colspan="2">
                             <asp:Button ID="BtGravar" runat="server" Text="Gravar" Enabled="False" 
                                 Height="26px" onclick="BtGravar_Click" />
                             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                             <asp:Button ID="BtCancelar" runat="server" Text="Cancelar" Enabled="False" 
                                 onclick="Cancelar_Click" />
                             
                         </td>
                     </tr>
                 </table>
                 <asp:Label ID="lbErro" runat="server"></asp:Label>
            </ContentTemplate>
            </asp:UpdatePanel>
        </div>
</asp:Content>

